The present invention relates to a converter for digital data transmission between an electrical interface of a first device and an electrical interface of a second device, the devices each using different voltage levels to distinguish the two logical states xe2x80x9chighxe2x80x9d and xe2x80x9clow.xe2x80x9d
When two electronic devices communicate with one another by data transmission, they must speak the same language. In the case of direct transmission of digital data, this means that the xe2x80x9chighxe2x80x9d and xe2x80x9clowxe2x80x9d logical states of the two devices must be represented by the same voltage levels.
The article xe2x80x9cGoedkope galvanische scheider voor RS232xe2x80x9d [Economical galvanic separators for RS-232], ELEKTUUR, July 1997 (1997-07), page 89, XP002102753 discloses a generic converter for digital data transmission for the RS-232 standard. This converter contains a specific embodiment of a galvanic separator in the context of an RS-232 interface. With this embodiment, switching members for generating the signals being transmitted are powered by a voltage that must first be generated by additional circuit elements. Furthermore, an additional voltage supply for the input-side circuit elements of the switching members is necessary.
Two principal standards are used in digital data transmission. The one standard is RS-232, which characterizes the xe2x80x9chighxe2x80x9d state with pulses having a voltage of approximately xe2x88x9212 volts and the xe2x80x9clowxe2x80x9d state with pulses having a voltage of approximately +12 volts. Serial interfaces of this kind are preferably used in computing systems such as personal computers (PCs). Many computer-controllable electronic devices, for example control units for motors, switching devices, or stored-program control systems, generate and use TTL standard pulses for communication, with signal strengths of approximately 0 volts for the one state and approximately +5 volts for the other state.
For communication between two electronic devices that work with different voltage levels, the signals must be transformed. In the case of the transformation of TTL standard signals, for example, the positive signals must be converted to xe2x88x9212 volts. This amplification of the signals is technically complex in that external voltage sources are necessary for the purpose. Lowering the signal strength in the case of the RS-232 and TTL standards can occur, however, by simply blocking the voltage with a diode or by transforming the voltage down.
Even if amplification of the signals presents no fundamental problems, for cost reasons and in order to save space it is advantageous specifically with small devices if voltage converters of this kind can be dispensed with, especially when communication with other devices during operation plays a subordinate role. Externally powered interface adapters, which have a plug connector whose housing accommodates a converter circuit with amplifiers, are known for such small devices. This circuit is supplied externally with a higher voltage. Because of the amplifier circuit, interface adapters of this kind are comparatively complex and result in additional cost pressure on electronic devices that are designed for inexpensive mass production.
It is an object of the present invention to create an interface adapter that can be manufactured economically with little technical outlay.
The present invention provides converter for digital data transmission between an electrical interface of a first device and an electrical interface, configured as an RS-232 interface, of a second device, the devices each using different voltage levels to distinguish the two logical states xe2x80x9chighxe2x80x9d and xe2x80x9clow.xe2x80x9d The converter includes an internal circuit with which the voltage levels of the first device can be converted to the voltage levels of the second device that correspond to the state, the higher voltage level being conveyable from one of the two devices to the internal circuit in order to convert the lower voltage level to the higher. The internal circuit (23) has conveyed to it, by programming of the second device, a voltage level of +12 volts via the Request To Send output of the RS-232 interface, and a voltage level of xe2x88x9212 volts via the Data Terminal Ready output of the RS-232 interface. The internal circuit (23) has a switching member (13a, 13b) which is independent of the supply voltage, which is controllable by the state of the data line (11) of the first device and which, depending on the logical state of the data line (11), switches one of the two lines, xe2x80x9cRequest to Send (14) or xe2x80x9cData Terminal Readyxe2x80x9d (17), delivered from the second device, through to the data input (15) of the RS-232 interface, of the second device.
The converter according to the present invention creates a simply designed and therefore economical possibility for connecting one electrical interface, e.g. the serial interface of a microcomputer, to the electrical interface of a device that is to be controlled, with simultaneous conversion of the signal levels that serve to differentiate the xe2x80x9chighxe2x80x9d and xe2x80x9clowxe2x80x9d logical states. Because the higher voltage level is delivered from one of the two devices, namely from the device that has an xe2x80x9con-boardxe2x80x9d RS-232 interface, in particular from a PC, an external power supply can be completely dispensed with. According to the present invention, one of the two devices itself makes the necessary voltage level available to the converter. The converter is characterized by its simple components and is particularly robust and reliable, since it combines the functions necessary for the transfer of data between mechanical interfaces that use different languages.
In a particularly advantageous embodiment, the converter (interface adapter) can be integrated into a plug connector that is located on the data transfer line connecting the two devices, but it can also be housed in one of the devices itself. Because of its inexpensive design, it contributes to the simplification of the devices and thus to a decrease in price.
It is particularly advantageous if the internal circuit brings about conversion of the lower level to the higher level by way of a simple switchover operation initiated by the lower-level signal. As a result of the switchover operation, the higher voltage level delivered to the adapter from a device is placed on the data line. According to the present invention, the complex amplification process is replaced by a simple switching operation, which contributes to a further simplification of the interface adapter in that the positive and negative supply voltages become superfluous. The switching operation is performed by way of a switching member that is controllable via the state of the data line of the first device and that, depending on the logical state of the data line, switches one of the two lines conveyed from the second device through to the data input of the second device.
In an advantageous embodiment, the internal circuit converts signals of the TTL standard, of 0 volts and +5 volts respectively, into signals of the RS-232 standard. Such a conversion is often necessary when a PC fitted with an RS-232 interface is communicating with an external device. Since the RS-232 interface has not only the data lines but also other lines, for example the Request To Send (RTS) and Data Terminal Ready (DTR) lines, it is advantageous to use these lines that are already present to convey to the interface adapter the voltage levels of, in particular +/xe2x88x9212 volts. These lines that are not needed for communication with the TTL interface can be switched, without great outlay and by way of a program running on the computer, to the +/xe2x88x9212 volt voltages generally made available by the computer. In this case the switching member simply switches the corresponding voltage through from the RTS or DTR line onto the data transfer line.
In a particularly simple embodiment, the switching member is a switch having two inputs and one output, the inputs being connected to the lines of the RS-232 interface at +/xe2x88x9212 volts and the output being connected to the input data transfer line, and the capability existing of switching back and forth between the two outputs.
In particularly advantageous fashion, the adapter according to the present invention is used for external programming of stored-program control systems with an integrated calculation unit (microcontroller), a display, and a control unit, the control system additionally having a mechanical interface. Since these control systems offer many utilization capabilities even without external programming, the electronics for signal conversion inside the control system can be replaced by the adapter. This makes the control system less expensive, more compact, and more reliable. The user is spared the cost of the amplifier circuit in the control system, and needs to acquire an adapter only when he or she wishes to perform external programming.
Advantageously, galvanic separation of the two devices is integrated into the adapter, so that the corresponding components in the devices can be dispensed with. For that purpose, the internal circuit has a coupling member for galvanic separation. Simple and economical optical couplers, which are available on the market in any desired variant, are suitable as coupling members. Optical couplers of this kind are also suitable for converting the +12 volt signals to the TTL level of +5 volts. Conversion in this direction is advantageously also brought about by the internal circuit. For converting the xe2x88x9212 volt signal to the TTL level of 0 volts, the internal circuit is advantageously equipped with a blocking element, for example in the form of a simple diode.
In a particularly simple embodiment, the internal circuit is accommodated in a housing injection-molded from plastic, which can be placed as a plug connector directly onto the mechanical interface of one of the two devices. The distance to the other interface is bridged using a cable for data transfer.